#include <stdio.h>
#include <math.h>
main()
{ 
	float sum, term , sign;   
	int   n;      
	n = 1;//1
	sum = 0;//1
	term = 1;//1
	sign = 1;//1
	                  
	while (fabs(term) >= 1e-6) //3    
	{	 	  	      
   		sum = sum + term;   //2        
   		sign = -sign;   //2           
   		n = n + 2;    //2             
   		term = sign / n; //2           
  	}
 	
 	printf("sum=%0.3f\n",sum);//2
}